package com.appoint.buss.service.impl;

import java.util.List;
import com.appoint.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.appoint.buss.mapper.WxInfConfigMapper;
import com.appoint.buss.domain.WxInfConfig;
import com.appoint.buss.service.IWxInfConfigService;

/**
 * 参数配置Service业务层处理
 *
 * @author appoint
 * @date 2022-12-03
 */
@Service
public class WxInfConfigServiceImpl implements IWxInfConfigService
{
    @Autowired
    private WxInfConfigMapper wxInfConfigMapper;

    /**
     * 查询参数配置
     *
     * @param id 参数配置主键
     * @return 参数配置
     */
    @Override
    public WxInfConfig selectWxInfConfigById(Long id)
    {
        return wxInfConfigMapper.selectWxInfConfigById(id);
    }

    /**
     * 查询参数配置列表
     *
     * @param wxInfConfig 参数配置
     * @return 参数配置
     */
    @Override
    public List<WxInfConfig> selectWxInfConfigList(WxInfConfig wxInfConfig)
    {
        return wxInfConfigMapper.selectWxInfConfigList(wxInfConfig);
    }

    /**
     * 新增参数配置
     *
     * @param wxInfConfig 参数配置
     * @return 结果
     */
    @Override
    public int insertWxInfConfig(WxInfConfig wxInfConfig)
    {
        wxInfConfig.setCreateTime(DateUtils.getNowDate());
        return wxInfConfigMapper.insertWxInfConfig(wxInfConfig);
    }

    /**
     * 修改参数配置
     *
     * @param wxInfConfig 参数配置
     * @return 结果
     */
    @Override
    public int updateWxInfConfig(WxInfConfig wxInfConfig)
    {
        wxInfConfig.setUpdateTime(DateUtils.getNowDate());
        return wxInfConfigMapper.updateWxInfConfig(wxInfConfig);
    }

    /**
     * 批量删除参数配置
     *
     * @param ids 需要删除的参数配置主键
     * @return 结果
     */
    @Override
    public int deleteWxInfConfigByIds(Long[] ids)
    {
        return wxInfConfigMapper.deleteWxInfConfigByIds(ids);
    }

    /**
     * 删除参数配置信息
     *
     * @param id 参数配置主键
     * @return 结果
     */
    @Override
    public int deleteWxInfConfigById(Long id)
    {
        return wxInfConfigMapper.deleteWxInfConfigById(id);
    }
}
